This invention relates to nodes of packet-switched networks, particularly active nodes of active networks. In this specification, active nodes and active network means as the sense in xe2x80x9cA Survy of Active Network Researchxe2x80x9d (David L. Tennenhouse, Jonathan M. Smith, W. David Sincoskie, David J. Wetherall, and Gray J. Minden, IEEE Communicarions Magazine, Vol. 35, No. 1, pp. 80-86. January 1997). In an active network, the routers or switches perform customized computations on the messages flowing through them. Active networks are active in the sense that nodes can perform computations on, and modify, the packet contents. In addition, this processing can be customized on a per user or per application basis.
When a packet-processing device receives a packet, the device allocates its resources (CPU time, memory and others) for the packet and then the packet is processed (like as transmission, cancellation, et al). Consquently, a reckless process may causc waste of the resources.
It is important to avoid the waste of the resources especially for the active network that adopts a capsule approach to realize the active network. The capsule approach replaces the passive packets of conventional architectures with active miniature programs that arm encapsulated in transmission frames and executed at each node along their path, and permits end users to describe the way to process a packet in the packet itself. If an end user misdescribes the program in the capsule, or the packet is transmitted incorrectly in the path, then the resources may be wasted by a reckless process.
xe2x80x9cANTS: A Toolkit for Building and Dynamically Deploying Network Protocolsxe2x80x9d (David J. Wetherall, John Guttag, and David L. Tennenhouse, Proceedings of IEEE OPENARCH ""98, pp.117-129) is described below. Packets contain descriptions of the maximum resources available for them in the lifecycle from the source node to the destination node, and if a packet uses resources over the maximum resources, the packet is unavailable for the resources. As the result, the amount of the resources that allocated for a packet in the network is limited.
xe2x80x9cPLAN: A packet Language for Active Networksxe2x80x9d (Michael Hicks, Pankaj Kakkar, Jonathan T. Moore, Carl A. Gunter and Scott Nettles scheduled to contribute to International Conference on Functional Programming (ICFP) 1998 and have opened at http://www.cis.upenn.edu/xcx9cswitchware as of Jun. 1, 1998) explains a language specification for describing the way of processing packets. This specification includes limitations to deny loop statement. As the result, this technique avoid endless usage of resources by a packet.
In conventional packet-switched networks like as IP version 4 and ATM (Asynchronous Transfer Mode), a packet has a header that prescribes the way of processing the packet itself. The packet contains check code that corresponds to the whole of the header to chock and correct transmission errors.
Conventional packet-switched networks mentioned above have some problems.
Firstly, it is difficult to limit the amount of resources of one node for a packet to be suitable for high speed processing.
For rapid processing of packets, a packet-processing device should allocate appropriate amount of the resources (for example, CPU time, memory, etc.) to each packet. When the amount of resources is not predetermined for the packet, it is difficult to design the packet-processing device. Particularly, this problem becomes serious in the network that packets are processed in ping.
On the other hand, to limit the amount of resources allocated for a packet in its lifecycle may consume large amount of resources. For example, a top packet-processing device in long path comprising many packet-processing devices incorrectly processes a packet with permission to be allocated large amount of resources.
Language specification can restrict the consumption volume of resources effectively. However, in this case high speed interpretation and also processing may become difficult when language specification becomes complicated.
Secondly, by establishing check code in a packet to the whole part that is prescribed the way of processing a packet to detect and correct transmission errors, a packet-processing device can not start to process the packet without finishing receiving the whole part This is not an important problem in the case that a processing method is prescribed to only a header part like the conventional packet switching such as IP and ATM because the size of the header is small.
However, in the case that the size of description about processing the packet may be large, like as the active network adopting capsule approach, the packet-processing device can not start process the description until the packet-processing device finishes receiving the description. Consequently, the time from the arrival of a packet to starting of processing the packet is long. Further, the size of buffer tends to be large in order to store large description.
In view of the problems mentioned above, the present invention provides packet-processing devices of active network adopting capsule approach that rapidly process packets.
According to an aspect of this invention, a method is for use in an active node included in an active network to allocate a sequence of packets received by the active node and comprises the steps of (1) receiving each packet of the sequence; (2) allocating each packet to a part of the resources by processing the packet sequence; (3) scheduling a duration available for the part of the resources; (4) measuring the duration; and (5) releasing the part of the resources with the remaining parts of the resources unreleased.
In this method, resource allocation concerned with the remaining packets is maintained at the step (5).
According to another aspect of this invention a method is for detecting an error in a sequence of packet received by an active node included in an active network and comprises the steps of: (1) receiving, at the active node, a packet comprising a plurality of parts each of which contains its check code for detecting an error; (2) finishing receiving a selected portion of the packet, and (3) checking at the active node by using the check code, without waiting for receiving the other portions of the packet.
In the above-mentioned method, the selected portion contains a code for designating a coding method of its check code and the active node checks the selected portion according to the coding method.
According to still another aspect of this invention, a packet-processing device is operable as an active node in an active network to allocate a packet to a resource and comprises a timing measuring unit for measuring a predetermined duration designated in the packet; and a release unit for releasing the resource when the predetermined duration designated in the packet lapses.
In the above-mentioned device, resource allocation concerned with other packets than the packet is maintained even if the predetermined duration designated in the packet lapses.
According to yet another aspect of this invention, a packet-processing device is operable as an active node in an active network to allocate a sequence of packets to resources coupled to the active node and comprises a packet input unit coupled to at least one input line, for detecting packet bounds of inputted packets; a resource manager for managing the resources by processing the packets; a resource management table for recording a relation between the packets and resources allocated the packets; a packet processor for processing packet contents of the packet sent from the packet input unit; and a packet output unit coupled to at least one output line, for outputting packets sent from the packet processor to the at least once output line. In this event, the packet-processing device is operable to process each packet according to the packet contents. On the other hand, the resource manager decides a finish time to finish processing each packet on the basis of a time determined by the packet input unit and recording the finish time in the resource management table while the packet processor discontinues processing packet contents at the finish time of each packet unless the packet processor finishes processing the packet
In the above-mentioned device, the device further comprises a interpacket process manager for managing a relationship among the packets included in the packet sequence. Processing is continuously executed in the packet processor in connection with the packet contents of each packet which is managed by the interpacket process manager unless the packet processor finishes processing the packet.
According to another aspect of this invention, a packet-processing device is operable as an active node in an active network to process a packet divided into a plurality of parts each of which has a check code for detecting an error and comprises a receiving unit for receiving the packet; a detection unit for detection tie part and the check code included in the packet; and all operation unit for starting interpreting the part and the check code without waiting for the other parts than the part of the packet when the packet-processing device receives the part and the check code.
According to the above-mentioned device, an error is checked in the part of the packet by a calculation method determined by the packet contents.